@import "../../style/variables.less";
@import "../../style/mixins/index.less";

.w-select{
  display: inline-block;
  position: relative;
  vertical-align: middle;
  & + .w-select{
    margin-left: 5px;
  }
  .w-input-icon-right i[class^="w-icon-"]{
    transition: transform @transition-time @transition-timing-functio;
      transform:rotate(0deg); 
  }
  .w-input{
    cursor: pointer;
  }
  &.unfold{
    .w-input-icon-right i[class^="w-icon-"] {
      transform:rotate(180deg); 
    }
  }
  .w-animate{
    position: relative;
  }
}

.w-select-warp{
  min-height: 10px;
  li{
    font-size: 12px;
    padding: 8px 10px;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #585858;
    height: 32px;
    line-height: 1.5;
    box-sizing: border-box;
    cursor: pointer;
    &:hover:not(.disabled){
      background-color: #efefef;
      color: #585858;
    }
    &.disabled{
      cursor: not-allowed;
      color: #dedede;
    }
    &.selected{
      background-color: #efefef;
    }
  }
}

.w-select.w-multiple{
  .w-select-warp{
    li.selected{
      background-color: transparent;
      color:#0c8c00;
      &:hover{
        background-color:rgba(51, 51, 51, 0.09);
      }
    }
  }
  .check{
    display: inline-block;
    height: 12px;
    width: 12px;
    font-size: 14px;
    position: absolute;
    right: 10px;
    margin-top: -3px;
  }
  .w-select-tags{
    min-height: 30px;
    position: absolute;
    z-index: 2;
    width: 100%;
    padding: 3px 0 3px 6px;
    .w-tag{
      margin-top: 3px;
      margin-bottom: 3px;
    }
  }
  .w-select-tags-filter{
    display: inline-block;
    input{
      border:0;
      padding-left: 0;
      padding-right: 0;
      background: transparent;
      margin-top: 3px;
      &:focus{
        box-shadow: 0 0 0 0;
      }
    }
    div.cal{
      position: absolute;
      display: inline-block;
      overflow: hidden;
      height: 0px;
      z-index: -1;
    }
  }
}

.w-select .w-popper-warpper{
  position: absolute;
  z-index: 1001;
}
.w-select-popper{
  position: absolute;
  top: 5px;
  max-height: 200px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 0 6px rgba(0,0,0,.04);
  box-sizing: border-box;
  ul.w-select-warp{
    outline: none;
    max-height: 200px;
    width: 100%;
    display: block;
    overflow: auto;
  }
}

.w-select-warp .w-select-group-warp{
  height: initial;
  padding:5px 0 0 0;
  &:hover:not(.disabled){
    background-color: transparent;
  }
  h2.w-select-group-title{
    padding-left: 10px;
    font-size: 12px;
    font-weight: normal;
    color: #999;
    height: 30px;
    line-height: 30px;
  }
}